]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
inputMethod: Equate empty preedit string to null
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 29 Oct 2021 14:41:55 +0000 (16:41 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 1 Nov 2021 17:34:27 +0000 (18:34 +0100)
If we get '' from the IM as the preedit string, it is pretty safe
to handle it as "no preedit" altogether.

(Cherry-picked from commit 286cfdc6d48dc4315df54d29d7d16b5198d92a56)

js/misc/inputMethod.js

index 1f9eaee7a8db2a1c27f3dd078ab5888805a0396b..7de7540d3f73e5e151d7c5c5f321e497f6efa1a1 100644 (file)
@@ -111,6 +111,8 @@ class InputMethod extends Clutter.InputMethod {
             return;
 
         let preedit = text.get_text();
+        if (preedit === '')
+            preedit = null;
 
         if (visible)
             this.set_preedit_text(preedit, pos, mode);